package com.manor.dynamic.bean;

import android.os.Parcel;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.manor.common.utils.StringUtil;

import java.io.Serializable;
import java.util.ArrayList;

public class CommunityDynamicBean implements MultiItemEntity , Serializable {
    public CommunityDynamicBean() {

    }
    /**
     * id : 42
     * uid : 73
     * title : Test photo
     * thumb : 73_IOS_20200407100640_action_image0_cover.png;73_IOS_20200407100640_action_image5_cover.png;73_IOS_20200407100640_action_image2_cover.png;73_IOS_20200407100640_action_image4_cover.png;73_IOS_20200407100640_action_image8_cover.png;73_IOS_20200407100640_action_image1_cover.png;73_IOS_20200407100640_action_image3_cover.png;73_IOS_20200407100640_action_image6_cover.png;73_IOS_20200407100640_action_image7_cover.png
     * video_thumb :
     * href :
     * voice :
     * length : 0
     * likes : 2
     * comments : 0
     * type : 1
     * isdel : 0
     * status : 1
     * uptime : 1586225217
     * xiajia_reason :
     * lat : 22.678804
     * lng : 22.678804
     * city : 深圳市
     * addtime : 1586225217
     * fail_reason :
     * width :
     * height :
     * datetime : 5分钟前
     * thumbs : ["http://online.shand2.com/73_IOS_20200407100640_action_image0_cover.png","http://online.shand2.com/73_IOS_20200407100640_action_image5_cover.png","http://online.shand2.com/73_IOS_20200407100640_action_image2_cover.png","http://online.shand2.com/73_IOS_20200407100640_action_image4_cover.png","http://online.shand2.com/73_IOS_20200407100640_action_image8_cover.png","http://online.shand2.com/73_IOS_20200407100640_action_image1_cover.png","http://online.shand2.com/73_IOS_20200407100640_action_image3_cover.png","http://online.shand2.com/73_IOS_20200407100640_action_image6_cover.png","http://online.shand2.com/73_IOS_20200407100640_action_image7_cover.png"]
     * islike : 0
     * userinfo : {"id":"73","user_nickname":"素年凉音","avatar":"","avatar_thumb":"","sex":"0","age":50}
     */

    private String id;
    private String uid;
    private String title;
    private String thumb;
    private String video_thumb;
    private String href;
    private String voice;
    private String length;
    private String likes;
    private String comments;
    private int type;
    private String isdel;
    private String status;
    private String uptime;
    private String xiajia_reason;
    private String lat;
    private String lng;
    private String city;
    private String addtime;
    private String over_num;
    private String fail_reason;
    private int width;
    private int height;
    private String datetime;
    private String islike;
    private UserinfoBean userinfo;
    private String isgg;
    private String jump_url = "";
    private String row;


    private ArrayList<String> thumbs;
    private int isattent;
    private boolean mVoicePlaying;
    private int mPosition;


    public static final int TEXT = 0;
    public static final int IMG = 1;
    public static final int VIDEO = 2;
    public static final int VOICE = 3;

    public String getRow() {
        return row;
    }

    public void setRow(String row) {
        this.row = row;
    }

    public String getJump_url() {
        return jump_url;
    }

    public void setJump_url(String jump_url) {
        this.jump_url = jump_url;
    }

    public String getIsgg() {
        if (StringUtil.isEmpty(isgg))
            return "";
        return isgg;
    }

    public void setIsgg(String isgg) {
        this.isgg = isgg;
    }

    public boolean isVoicePlaying() {
        return mVoicePlaying;
    }

    public void setVoicePlaying(boolean voicePlaying) {
        mVoicePlaying = voicePlaying;
    }

    public int getPosition() {
        return mPosition;
    }

    public void setPosition(int position) {
        mPosition = position;
    }

    protected CommunityDynamicBean(Parcel in) {
        id = in.readString();
        uid = in.readString();
        title = in.readString();
        thumb = in.readString();
        video_thumb = in.readString();
        href = in.readString();
        voice = in.readString();
        length = in.readString();
        likes = in.readString();
        comments = in.readString();
        type = in.readInt();
        isdel = in.readString();
        status = in.readString();
        uptime = in.readString();
        xiajia_reason = in.readString();
        lat = in.readString();
        lng = in.readString();
        city = in.readString();
        addtime = in.readString();
        over_num = in.readString();
        fail_reason = in.readString();
        width = in.readInt();
        height = in.readInt();
        datetime = in.readString();
        islike = in.readString();
        userinfo = in.readParcelable(UserinfoBean.class.getClassLoader());
        thumbs = in.createStringArrayList();
        isattent = in.readInt();
        mVoicePlaying = in.readByte() != 0;
        mPosition = in.readInt();
    }



    public int getIsattent() {
        return isattent;
    }

    public void setIsattent(int isattent) {
        this.isattent = isattent;
    }

    public String getOver_num() {
        return over_num;
    }

    public void setOver_num(String over_num) {
        this.over_num = over_num;
    }

    public boolean ismVoicePlaying() {
        return mVoicePlaying;
    }

    public void setmVoicePlaying(boolean mVoicePlaying) {
        this.mVoicePlaying = mVoicePlaying;
    }

    public int getmPosition() {
        return mPosition;
    }

    public void setmPosition(int mPosition) {
        this.mPosition = mPosition;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getThumb() {
        return thumb;
    }

    public void setThumb(String thumb) {
        this.thumb = thumb;
    }

    public String getVideo_thumb() {
        return video_thumb;
    }

    public void setVideo_thumb(String video_thumb) {
        this.video_thumb = video_thumb;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public String getVoice() {
        return voice;
    }

    public void setVoice(String voice) {
        this.voice = voice;
    }

    public String getLength() {
        return length;
    }

    public void setLength(String length) {
        this.length = length;
    }

    public String getLikes() {
        return likes;
    }

    public void setLikes(String likes) {
        this.likes = likes;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getIsdel() {
        return isdel;
    }

    public void setIsdel(String isdel) {
        this.isdel = isdel;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getUptime() {
        return uptime;
    }

    public void setUptime(String uptime) {
        this.uptime = uptime;
    }

    public String getXiajia_reason() {
        return xiajia_reason;
    }

    public void setXiajia_reason(String xiajia_reason) {
        this.xiajia_reason = xiajia_reason;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public String getFail_reason() {
        return fail_reason;
    }

    public void setFail_reason(String fail_reason) {
        this.fail_reason = fail_reason;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public String getDatetime() {
        return datetime;
    }

    public void setDatetime(String datetime) {
        this.datetime = datetime;
    }

    public String getIslike() {
        return islike;
    }

    public void setIslike(String islike) {
        this.islike = islike;
    }

    public UserinfoBean getUserinfo() {
        return userinfo;
    }

    public void setUserinfo(UserinfoBean userinfo) {
        this.userinfo = userinfo;
    }

    public ArrayList<String> getThumbs() {
        return thumbs;
    }

    public void setThumbs(ArrayList<String> thumbs) {
        this.thumbs = thumbs;
    }

    @Override
    public int getItemType() {
        return type;
    }




    public static class UserinfoBean implements Serializable{
        public  UserinfoBean(){}
        /**
         * id : 73
         * user_nickname : 素年凉音
         * avatar :
         * avatar_thumb :
         * sex : 0
         * age : 50
         */

        private String id;
        private String user_nickname;
        private String avatar;
        private String avatar_thumb;
        private String sex;
        private int age;
        private String isauth;
        private String gzu_icon;
        private String level_icon;
        private String immortal;
        private String quality;

        protected UserinfoBean(Parcel in) {
            id = in.readString();
            user_nickname = in.readString();
            avatar = in.readString();
            avatar_thumb = in.readString();
            sex = in.readString();
            age = in.readInt();
            isauth = in.readString();
            gzu_icon = in.readString();
            level_icon = in.readString();
            immortal = in.readString();
            quality = in.readString();
        }


        public void setQuality(String quality) {
            this.quality = quality;
        }

        public String getQuality() {
            return quality;
        }

        public void setImmortal(String immortal) {
            this.immortal = immortal;
        }

        public String getImmortal() {
            return immortal;
        }

        public String getGzu_icon() {
            return gzu_icon;
        }

        public void setGzu_icon(String gzu_icon) {
            this.gzu_icon = gzu_icon;
        }

        public String getLevel_icon() {
            return level_icon;
        }

        public void setLevel_icon(String level_icon) {
            this.level_icon = level_icon;
        }

        public String getIsauth() {
            return isauth;
        }

        public void setIsauth(String isauth) {
            this.isauth = isauth;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getUser_nickname() {
            return user_nickname;
        }

        public void setUser_nickname(String user_nickname) {
            this.user_nickname = user_nickname;
        }

        public String getAvatar() {
            return avatar;
        }

        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }

        public String getAvatar_thumb() {
            return avatar_thumb;
        }

        public void setAvatar_thumb(String avatar_thumb) {
            this.avatar_thumb = avatar_thumb;
        }

        public String getSex() {
            if (StringUtil.isEmpty(sex))
                return "";
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }




    }

    @Override
    public String toString() {
        return "CommunityDynamicBean{" +
                "id='" + id + '\'' +
                ", uid='" + uid + '\'' +
                ", title='" + title + '\'' +
                ", thumb='" + thumb + '\'' +
                ", video_thumb='" + video_thumb + '\'' +
                ", href='" + href + '\'' +
                ", voice='" + voice + '\'' +
                ", length='" + length + '\'' +
                ", likes='" + likes + '\'' +
                ", comments='" + comments + '\'' +
                ", type='" + type + '\'' +
                ", isdel='" + isdel + '\'' +
                ", status='" + status + '\'' +
                ", uptime='" + uptime + '\'' +
                ", xiajia_reason='" + xiajia_reason + '\'' +
                ", lat='" + lat + '\'' +
                ", lng='" + lng + '\'' +
                ", city='" + city + '\'' +
                ", addtime='" + addtime + '\'' +
                ", fail_reason='" + fail_reason + '\'' +
                ", width='" + width + '\'' +
                ", height='" + height + '\'' +
                ", datetime='" + datetime + '\'' +
                ", islike='" + islike + '\'' +
                ", userinfo=" + userinfo +
                ", thumbs=" + thumbs +
                '}';
    }
}
